{extend name="base/nei" }

{block name="body"}
<div class="c1ad"></div>

<div class="dst">
    <div class="content" id="wlds">
        <div class="big_title"><span></span><h2>网络电视</h2></div>
        <div class="nav-box">
            <ul class="hd">
                <?php 
                    $parents = db("tv" , [] , false)->field("tcate,ttype")->group("tcate,ttype")->select();
                    foreach($parents as $p):
                ?>
                <li class=""><a href="javascript:;"><?php echo $p['ttype']; ?></a></li>
                <?php endforeach; ?>
            </ul>
        </div>

        <div class="list-box" id="wlds-bd">
            <div class="bd" id="tabBox1-bd">
                <?php 
                    foreach($parents as $p):
                ?>
                <div class="con">
                    <ul class="tvlist">
                        <?php
                        $subs = db("tv" , [] , false)->field("id,tname,tlogo")->where("tcate" , $p['tcate'])->select();
                        foreach($subs as $k => $s):
                    ?>  
                    <li><a href="/pindao/info/id/<?php echo $s['id']; ?>"><?php echo $s['tname']; ?></a></li>
                    <?php endforeach; ?>
                    </ul>
                </div>
                <?php endforeach; ?>
                
            </div>
        </div>


    </div>



</div>

<script type="text/javascript">
	TouchSlide( { slideCell:"#wlds",
				endFun:function(i){ //高度自适应
					var bd = document.getElementById("tabBox1-bd");
					bd.parentNode.style.height = bd.children[i].children[0].offsetHeight+"px";
					if(i>0)bd.parentNode.style.transition="200ms";//添加动画效果
				}

			} );
			
</script>

{/block}